package com.gezi.admin.module.sys.user.model;

import com.gezi.admin.config.validate.constraint.enumvalid.EnumValid;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.Size;
import java.util.List;

/**
 * @Author 格子软件
 * @createDate 2024/2/10 09:00
 * @contact 公众号：格子软件 微信：13716343106 邮箱：1424529270@qq.com
 */
@Data
public class SysUserAddParamModel {

    @NotBlank(message = "用户昵称不能为空")
    @Size(min = 1,max = 30,message = "用户昵称长度不正确")
    @ApiModelProperty(value = "用户昵称")
    private String nickName;

    @NotBlank(message = "登录名称不能为空")
    @Size(min = 1,max = 30,message = "登录名称长度不正确")
    @ApiModelProperty(value = "登录名称")
    private String loginName;

    @ApiModelProperty(value = "头像")
    private String headUrl;

    @ApiModelProperty(value = "密码")
    private String password;

    @Size(min = 0,max = 11,message = "手机号长度不正确")
    @ApiModelProperty(value = "手机号")
    private String phone;

    @Size(min = 0,max = 50,message = "Email长度不正确")
    @ApiModelProperty(value = "Email")
    private String email;

    @EnumValid(target = SysUserStateEnum.class, message = "角色不能为空")
    @ApiModelProperty(value = "state")
    private String state;

    @NotEmpty(message = "角色不能为空")
    @ApiModelProperty(value = "角色")
    private List<String> roleIdList;
}
